<?php
use session\UserSession;
use controller\HomeController;
require dirname(__DIR__) . '/vendor/autoload.php';

session_start();

$session_obj = new UserSession(2, "mtelSucks");

$_SESSION['user'] = $session_obj;

$contrl = new HomeController($_SESSION);


echo '	<script>
			conn = new WebSocket(\'ws://localhost:8080/final-project/zlatniq-vek/bin/server.php\');
			conn.onopen = function(e) { };
			conn.onmessage = function(e) {
				console.log("asasa"); 
				console.log (e.data)
			};
		</script>';